package com.tuanzi.loan.web.lazy.family;

import com.tuanzi.loan.business.service.family.LoanApiOrderRepaymentService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.family.LoanApiOrderRepaymentSearchRequest;
import com.tuanzi.loan.vo.response.family.LoanApiOrderRepaymentSearchResponse;
import org.springframework.data.domain.Page;
/**
* @Description:    全流程还款计划明细
* @Author:         xionghao
* @CreateDate:     2018-10-08
*/
public class LoanApiOrderRepaymentLazyDataModel extends
        BaseLazyDataModel<LoanApiOrderRepaymentSearchRequest,LoanApiOrderRepaymentSearchResponse> {

    private static final long serialVersionUID = 8573835100938720615L;

    private LoanApiOrderRepaymentService service = SpringContextHolder.getBean(LoanApiOrderRepaymentService.class);

    public LoanApiOrderRepaymentLazyDataModel(LoanApiOrderRepaymentSearchRequest loanApiOrderRepaymentSearchRequest) {
        super(loanApiOrderRepaymentSearchRequest);
    }

    @Override
    protected Page<LoanApiOrderRepaymentSearchResponse> doLoad(PageSearcher<LoanApiOrderRepaymentSearchRequest> pageSearcher) {
        return service.list(pageSearcher);
    }
}
